<?php


namespace App\Exceptions;


class LoginException extends BaseException
{
    // 异常类分组
    const CODE_1000 = 1000;
    const CODE_1001 = 1001;
    const CODE_1002 = 1002;
    const CODE_1003 = 1003;
    const CODE_1004 = 1004;
    const CODE_1005 = 1005;
    const CODE_1006 = 1006;
    const CODE_1007 = 1007;
    const CODE_1008 = 1008;
    const CODE_1009 = 1009;
    const CODE_1010 = 1010;
    const CODE_1011 = 1011;
    const CODE_1012 = 1012;
    const CODE_1013 = 1013;
    const CODE_1014 = 1014;
    const CODE_1015 = 1015;

    protected int   $baseCode = self::BASE_CODE_OF_LOGIN;    //
    protected array $showMsg  = [
        self::CODE_1000 => '登录状态失效，请重新登录',
        self::CODE_1001 => '用户名或密码错误',
        self::CODE_1002 => '登陆失败! 用户被禁止登录!',
        self::CODE_1003 => '非法用户，请联系客服检查用户状态',
        self::CODE_1004 => '验证码已失效',
        self::CODE_1005 => '验证码验证失败',
        self::CODE_1006 => 'Token已过期，请重新登录',
        self::CODE_1007 => 'Token签名无效，请重新登录',
        self::CODE_1008 => 'Token尚未有效，请重新登录',
        self::CODE_1009 => 'Token验证失败，请重新登录',
        self::CODE_1010 => '用户名已注册',
        self::CODE_1011 => '用户不存在',
        self::CODE_1012 => '删除失败, 自杀失败',
        self::CODE_1013 => '超级管理员用户不可删除',
        self::CODE_1014 => '两次输入的密码不同',
        self::CODE_1015 => '入驻审核中'
    ];

    function __construct($msg = '', $code = 0)
    {
        parent::__construct($msg, $code);
    }
}
